<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-53aa7ff21900e7b5"></script>


<div class="row-fluid">
    <div class="head-outer">
        <?php echo $this->element('top');?>
        <div class="row-fluid" style="width:1000px;margin:0 auto">
            <div class="span3 header-left content-left">
                <?php
                    if(!empty($banner)){
                ?>
                    <a href="<?php echo DOMAIN;?>">
                        <?php if(get_extension($banner['Extention']['images']) == "swf") { ?>
                            <embed src="<?php echo SWF_URL.$banner['Extention']['images']; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="0" height="102" scale="ExactFit"> </embed>
                        <?php } else { ?>
                            <img src="<?php echo IMG_URL.$banner['Extention']['images']; ?>" style="width: 100%; height: 102px;"/>
                        <?php } ?>
                    </a>
                <?php }?>
            </div>
            <div class="content-main rowfluid" style="overflow: hidden;">
                <div class="span8">
                    <?php
                        if(!empty($bannercenter)){
                    ?>
                        <a href="<?php echo DOMAIN;?>">
                            <?php if(get_extension($bannercenter['Extention']['images']) == "swf") { ?>
                                <embed src="<?php echo SWF_URL.$bannercenter['Extention']['images']; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="0" height="102" scale="ExactFit"> </embed>
                            <?php } else { ?>
                                <img src="<?php echo IMG_URL.$bannercenter['Extention']['images']; ?>" style="width: 100%; height: 90px;margin: 5px 2px 0px 3px;"/>
                            <?php } ?>
                        </a>
                    <?php }?>
                </div>
                <div class="span4 pull-right">
                    <?php
                        if(!empty($bannerright)){
                    ?>
                        <a href="<?php echo DOMAIN;?>">
                            <?php if(get_extension($bannerright['Extention']['images']) == "swf") { ?>
                                <embed src="<?php echo SWF_URL.$bannerright['Extention']['images']; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="0" height="102" scale="ExactFit"> </embed>
                            <?php } else { ?>
                                <img src="<?php echo IMG_URL.$bannerright['Extention']['images']; ?>" style="width: 100%; height: 90px;margin: 5px 2px 0px 4px;"/>
                            <?php } ?>
                        </a>
                    <?php }?>
                </div>
            </div>
        </div>

        <div class="clear-main"></div>
        <div class="box-menu">
		<div class="menu-top-fix">
            <div class="span3 fix-menu-left content-left">
                <a href="<?php echo DOMAIN;?>" title="Trang chủ">
                    <p></p>
                </a>
            </div>
            <div class="span3 fix-form-search">
                <form method="post" action="<?php echo DOMAIN;?>tim-kiem.html">
                    <input type="text" class="input-search" name="search" placeholder="<?php echo lang('timkiem');?>"/>
                </form>
            </div>
			<div class="span6 fix-menu-right">
				<ul>
				<?php if(empty($user_login)){?>
                <li><a href="<?php echo DOMAIN;?>dang-ky" title="Đăng ký thành viên">Đăng ký</a></li>
                <li><a href="#login" title="Đăng nhập" data-toggle="modal">Đăng nhập</a></li>
                <?php }else{?>
                    <li class="hover-user">
                        <div class="btn-group">
                            <a href="<?php echo DOMAIN;?>user/blog/<?php echo $user_login['id'];?>" title="<?php echo lang('trang_ca_nhan');?>">
                                <img src="<?php echo DOMAIN;?>img/w25/h25/<?php echo $user_login['images'];?>" style="margin-right: 8px;"/>
                                <?php echo $user_login['fullname'];?>
                            </a>
                            <a href="<?php echo DOMAIN;?>user/blog/<?php echo $user_login['id'];?>/friends"><img src="<?php echo DOMAIN;?>theme/blog_icon_03.png" style="margin: 0 5px; height: 22px;"/></a>
                            <span class="btn-group" style="margin: -8px 0px 0 0px; white-space: normal;">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="position: relative;">
                                    <img src="<?php echo DOMAIN;?>theme/blog_icon_05.png" style="height: 22px;"/><span class="" style="position: absolute; top: -33px; right: 12px; text-align: center; font-size: 10px; color: red;"><?php if(!empty($list_mess)) echo count($list_mess);?></span>
                                </a>
                                <ul class="dropdown-menu" style="font-size: 11px; border-radius: 0; background: #f2f2f2; margin-top: 5px;">
                                    <div style="position: relative;"><img src="<?php echo DOMAIN;?>images/mt-fr.png" style="position: absolute; top: -11px; right: 2px;"/></div>
                                    <div class="tab-chuc-nang-user">
                                        <ul>
                                            <?php foreach($list_mess as $mess){?>
                                                <li><a href="<?php echo DOMAIN.'tinnhan/add/'.$mess['User']['id'];?>/<?php echo $mess['Tinnhan']['id']?>" title="<?php echo shortDesc($mess['Tinnhan']['content'], 50);?>">
                                                   <div style="width: 220px !important; line-height: 19px; font-size: 12px;">
                                                   - <span style="font-weight: bold;"><?php if(isset($mess['User']['fullname'])) echo $mess['User']['fullname'].'</span> - ';?>
                                                   <span style="font-weight: normal;"><?php echo shortDesc($mess['Tinnhan']['content'], 50);?></div></span>
                                                   </a>
                                                </li>
                                            <?php }?>
                                        </ul>
                                    </div>
                                </ul>
                            </span>
                            
                            <span class="btn-group" style="margin: -8px 10px 0 10px;">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="position: relative;">
                                    <img src="<?php echo DOMAIN;?>theme/blog_icon_07.png" style="height: 22px;"/><span class="" style="position: absolute; top: -33px; right: 5px; font-size: 10px; color: red;"><?php if(!empty($list_thongbao)) echo count($list_thongbao);?></span>
                                </a>
                                <ul class="dropdown-menu" style="font-size: 11px; border-radius: 0; background: #f2f2f2; margin-top: 5px;">
                                    <div style="position: relative;"><img src="<?php echo DOMAIN;?>images/mt-fr.png" style="position: absolute; top: -11px; right: 2px;"/></div>
                                    <div class="tab-chuc-nang-user">
                                        <ul>
                                            <?php foreach($list_thongbao as $mess){?>
                                                <li><a href="#" title="<?php echo $mess['Thongbao']['content'];?>">
                                                   <div style="width: 220px !important; line-height: 19px; font-size: 12px;">
                                                   
                                                   <span style="font-weight: normal;"><?php echo $mess['Thongbao']['content'];?></div></span>
                                                   </a>
                                                </li>
                                            <?php }?>
                                        </ul>
                                    </div>
                                </ul>
                            </span>
                            
                            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                <i class="fa fa-bars"></i>
                            </a>
                            <ul class="dropdown-menu" style="font-size: 11px; border-radius: 0; background: #f2f2f2; margin-top: 5px;">
                                <div style="position: relative;"><img src="<?php echo DOMAIN;?>images/mt-fr.png" style="position: absolute; top: -11px; right: 2px;"/></div>
                                <div class="tab-chuc-nang-user">
                                    <ul>
                                        <li><a href="<?php echo DOMAIN;?>user/blog/<?php echo $user_login['id'];?>" title="<?php echo lang('trang_ca_nhan');?>"><?php echo lang('trang_ca_nhan');?> <i class="fa fa-user"></i></a></li>
                                        <li><a href="<?php echo DOMAIN;?>user/info/<?php echo $user_login['id'];?>" title="<?php echo lang('thong_tin');?>"><?php echo lang('thong_tin');?> <i class="fa fa-list-alt"></i></a></li>
                                        <?php if(!$this->Session->check('dangnhapface')){?><li><a href="<?php echo DOMAIN;?>user/pass/<?php echo $user_login['id'];?>" title="<?php echo lang('doi_pass');?>"><?php echo lang('doi_pass');?> <i class="fa fa-unlock-alt"></i></a></li><?php }?>
                                        <li><a href="<?php echo DOMAIN;?>dang-xuat" title="<?php echo lang('thoat');?>"><?php echo lang('thoat');?> <i class="fa fa-sign-out"></i></a></li>
                                    </ul>
                                </div>
                            </ul>
                        </div>
                    </li><!--end hover-user-->
                <?php }?>

				<div class="uploadmenu">
                    <div class="dang-bai">
				        <?php if(empty($user_login)){?>
                            <a href="#login" title="<?php echo lang('dangbai');?>" data-toggle="modal">
                                <?php echo lang('dangbai');?>
                            </a>
                        <?php }else{?>
                            <a href="<?php echo DOMAIN;?>dang-bai" title="đăng bài">
                                Đăng bài
                            </a>
                        <?php }?>
                    </div>
				</div>
				</ul>
			</div>

            <!--<div class="span9 fix-menu-right">
                <h2>Sản phẩm thiết kế</h2>
                <div class="box-menu-thiet-ke">
                    <?php // echo $this->element('menu');?>
                    <div class="clear-main"></div>
                </div>
            </div>-->
            <div class="clear-main"></div>
        </div><!--end box-menu-->
		</div>
    </div><!--end head-outer-->
</div>